<style type="text/css">
	.paipai_admin_head li{
		float:left;
		margin-right: 10px;
	}
	.paipai_admin_head li.on a{
		color:#333;
		font-weight: 700;
		text-decoration: none;
	}
</style>
<ul class="paipai_admin_head">
	<li <!--{if !isset($_GET['show'])}-->class="on"<!--{/if}--> >
		<a href='admin.php?action=plugins&operation=config&do=$pluginid&identifier=iweitao_paipai&pmod=admin'>全部</a>
	</li>
	<li <!--{if isset($_GET['show']) && $_GET['show'] == 'deal'}-->class="on" onclick="return false;"<!--{/if}--> >
		<a href='admin.php?action=plugins&operation=config&do=$pluginid&identifier=iweitao_paipai&pmod=admin&show=deal'>交易完成</a>
	</li>
</ul>
<?php 
showtableheader();

?>

	<tr>
		<td>状态</td>
		<td>卖家</td>
		<td>商品名称</td>
		<td>起拍价</td>
		<td><!--{if isset($_G['ac']) &&$_G['ac'] == 'deal'}-->成交价<!--{else}-->最终价<!--{/if}--></td>
		<td>开始时间</td>
		<td>结束时间</td>
		<td>管理操作</td>
	</tr>
<!--{if $getcount}-->
	<!--{loop $getcount $k $v}-->
		<tr>
			<td>
			<!--{eval}-->
				$status = '';
				switch($v['status']){

					case 1:
					$status = '<span style="color:green;">正常</span>';
					break;
					case -1:
					$status = '<span style="color:red;">退款申请</span>';
					break;
					case -2:
					$status = '<span style="color:red;">已退款</span>';
					break;
					case 2:
					$status = '<span style="color:orange;">流拍</span>';
					break;
					case 3:
					$status = '<span style="color:orange;">等待结算</span>';
					break;
					case 4:
					$status = '<span style="color:blue;">交易完成</span>';
					break;
					default:
					$status = '<span style="color:red;font-weight:700;">error</span>';
				}
				if($v['order_status'] == -1){
					$status = '<span style="color:red;">退款申请</span>';
				}
				if($v['order_status'] == -2){
					$status = '<span style="color:red;">已退款</span>';
				}
			<!--{/eval}-->
			{$status}</td>
			<td>{$v['username']}</td>
			<td><a target='_blank' href='forum.php?mod=viewthread&tid={$v['tid']}'>{$v['title']}</a></td>
			<td>{$v['origin_price']}</td>
			<td>{$v['price']}</td>
			<td><!--{eval $time = date('Y-m-d H:i',$v['date_start']);}-->{$time}</td>
			<td><!--{eval $time = date('Y-m-d H:i',$v['date_end']);}-->{$time}</td>
			<td>
				<!--{if $v['order_status'] == -1}-->
					<a href='admin.php?action=plugins&operation=config&do=$pluginid&identifier=iweitao_paipai&pmod=admin&ac=return&acdo={$v["tid"]}' onclick="return confirm('确定退款吗?');">同意退款</a>
				<!--{/if}-->
				<a href='admin.php?action=plugins&operation=config&do=$pluginid&identifier=iweitao_paipai&pmod=admin&ac=delete&acdo={$v["tid"]}' onclick="return confirm('确定删除该拍卖商品吗?');">删除商品</a>

			</td>
		</tr>
	<!--{/loop}-->
<!--{/if}-->



<?php

showtablefooter();
 ?>

<!-- 分页 -->
<div id='page' style='margin-top:20px;height:50px;width:100%;'>
	{$page_show}
</div>
<!-- ./分页 -->
